window.URL = window.URL || window.webkitURL;
	var fileElem0 = document.getElementById("fileElem0"),
	    fileList0 = document.getElementById("fileList0");
	    var fileElem1 = document.getElementById("fileElem1"),
	    fileList1 = document.getElementById("fileList1");
	    var fileElem2 = document.getElementById("fileElem2"),
	    fileList2 = document.getElementById("fileList2");
		var fileElem3 = document.getElementById("fileElem3"),
	    fileList3 = document.getElementById("fileList3");
	    var fileElem4 = document.getElementById("fileElem4"),
	    fileList4 = document.getElementById("fileList4");
	function handleFiles(obj) {
		var id=obj.id;
		alert(id)
		if('fileElem0'==id){ 
			fileList=fileList0;
		}if('fileElem1'==id){ 
			fileList=fileList1;
		}if('fileElem2'==id){ 
			fileList=fileList2;
		}
		if('fileElem3'==id){ 
			fileList=fileList3;
		}
		if('fileElem4'==id){ 
			fileList=fileList4;
		}
		alert(fileList)
		if(fileList.hasChildNodes()){
			//fileList.removeChild(fileList.firstChild);
			$(fileList).empty();
		}
		
		var files = obj.files,
			img = new Image();
		if(window.URL){
			//File API
			//  alert(files[0].name + "," + files[0].size + " bytes");
		      img.src = window.URL.createObjectURL(files[0]); //创建一个object URL，并不是你的本地路径
		      img.width = 200;
		      img.onload = function(e) {
		         window.URL.revokeObjectURL(this.src); //图片加载后，释放object URL
		      }
		      fileList.appendChild(img);
		}else if(window.FileReader){
			//opera不支持createObjectURL/revokeObjectURL方法。我们用FileReader对象来处理
			var reader = new FileReader();
			reader.readAsDataURL(files[0]);
			reader.onload = function(e){
			//	alert(files[0].name + "," +e.total + " bytes");
				img.src = this.result;
				img.width = 200;
				fileList.appendChild(img);
			}
		}else{
			//ie
			obj.select();
			obj.blur();
			var nfile = document.selection.createRange().text;
			document.selection.empty();
			img.src = nfile;
			img.width = 200;
			img.onload=function(){
		      alert(nfile+","+img.fileSize + " bytes");
		    }
			fileList.appendChild(img);
			//fileList.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image',src='"+nfile+"')";
		}
	}